package com.younion.common.constants;


public enum Schedule {
	
	ONECE("ONECE","一次性"),EVERYDAY("EVERYDAY","每天"), EVERYWEEK("EVERYWEEK","每周"), EVERYMONTH("EVERYMONTH","每月"),EVERYYEAR("EVERYYEAR", "每年");
	private String name;
	private String title;

	private Schedule(String name,String title) {
		this.name = name;
		this.title = title;
	}

	public String getName() {
		return name;
	}
	
	public String getTitle(){
		return title;
	}

	public static Schedule valueOfName(String name) {
		for (Schedule e : Schedule.values()) {
			if (e.getName().equals(name)) {
				return e;
			}
		}
		return null;
	}

	public static void main(String[] args) {
		System.out.print(Schedule.valueOfName("*"));
	}
	
}
